import geo
import pandas as pd
#获取所有点的坐标
def direction_ddcx1(key,start_address1,start_address2,start_address3,start_address4):
    """    """
    start1 = geo.geocode(key, start_address1)['geocodes'][0]['location']
    start2 = geo.geocode(key, start_address2)['geocodes'][0]['location']
    start3 = geo.geocode(key, start_address3)['geocodes'][0]['location']
    start4 = geo.geocode(key, start_address4)['geocodes'][0]['location']
    return (start1,start2,start3,start4)
#将所有点的名称进行合并在一起，下面同理
def direction_ddbc1(start_address1,start_address2,start_address3,start_address4):
    """    """
    return (start_address1,start_address2,start_address3,start_address4)


def direction_ddcx2(key,start_address1, start_address2,start_address3,start_address4,start_address5):
    """    """
    start1 = geo.geocode(key, start_address1)['geocodes'][0]['location']
    start2 = geo.geocode(key, start_address2)['geocodes'][0]['location']
    start3 = geo.geocode(key, start_address3)['geocodes'][0]['location']
    start4 = geo.geocode(key, start_address4)['geocodes'][0]['location']
    start5 = geo.geocode(key, start_address5)['geocodes'][0]['location']
    return (start1,start2,start3,start4,start5)

def direction_ddbc2(start_address1,start_address2,start_address3,start_address4,start_address5):
    """    """
    return (start_address1,start_address2,start_address3,start_address4,start_address5)

def direction_ddcx3(key,start_address1, start_address2,start_address3,start_address4,start_address5,start_address6):
    """    """
    start1 = geo.geocode(key, start_address1)['geocodes'][0]['location']
    start2 = geo.geocode(key, start_address2)['geocodes'][0]['location']
    start3 = geo.geocode(key, start_address3)['geocodes'][0]['location']
    start4 = geo.geocode(key, start_address4)['geocodes'][0]['location']
    start5 = geo.geocode(key, start_address5)['geocodes'][0]['location']
    start6 = geo.geocode(key, start_address6)['geocodes'][0]['location']
    return (start1,start2,start3,start4,start5,start6)

def direction_ddbc3(start_address1,start_address2,start_address3,start_address4,start_address5,start_address6):
    """    """
    return (start_address1,start_address2,start_address3,start_address4,start_address5,start_address6)

def direction_ddcx4(key,start_address1, start_address2,start_address3,start_address4,start_address5,start_address6,start_address7):
    """    """
    start1 = geo.geocode(key, start_address1)['geocodes'][0]['location']
    start2 = geo.geocode(key, start_address2)['geocodes'][0]['location']
    start3 = geo.geocode(key, start_address3)['geocodes'][0]['location']
    start4 = geo.geocode(key, start_address4)['geocodes'][0]['location']
    start5 = geo.geocode(key, start_address5)['geocodes'][0]['location']
    start6 = geo.geocode(key, start_address6)['geocodes'][0]['location']
    start7 = geo.geocode(key, start_address7)['geocodes'][0]['location']
    return (start1,start2,start3,start4,start5,start6,start7)

def direction_ddbc4(start_address1,start_address2,start_address3,start_address4,start_address5,start_address6,start_address7):
    """    """
    return (start_address1,start_address2,start_address3,start_address4,start_address5,start_address6,start_address7)